Home |
| Latest | About | Random
# 14 Linear combinations. Linear combination is a core idea in linear algebra, so let us once more define it here. > **Definition. Linear combination.** > Give some finite collection of objects $v_{1},v_{2},\ldots,v_{k}$, where addition and scaling of these objects make sense, then an expression of the form $$ c_{1} v_{1} + c_{2} v_{2} + \cdots + c_{k} v_{k} $$ is a **linear combination** of the objects $v_{1},v_{2},\ldots,v_{k}$, with coefficients (or weights) $c_{1},c_{2},\ldots,c_{k}$, where $c_{i}$ are some scalars. Let us see some examples using this terminology. **Example.** The expression $$ 3 \begin{bmatrix} 1 \\ 3 \end{bmatrix} - 7 \begin{bmatrix} 10 \\ 2 \end{bmatrix} $$is a linear combination of the vectors $\begin{bmatrix}1\\3\end{bmatrix}$ and $\begin{bmatrix}10 \\2\end{bmatrix}$, with corresponding weights $3$ and $-7$. And yes, this is equal to the vector $\begin{bmatrix}-67 \\ -5 \end{bmatrix}$. If we think of it in reverse, this also says **we can express $\begin{bmatrix}-67 \\ -5 \end{bmatrix}$ as a linear combination of the vectors $\begin{bmatrix}1 \\ 3 \end{bmatrix}$ and $\begin{bmatrix}10\\2 \end{bmatrix}$.** The weights of this linear combination is $3$ and $-7$ respectively. **Example.** Can we write $\begin{bmatrix}1\\ 2 \end{bmatrix}$ as a linear combination of the vectors $\begin{bmatrix}1 \\ 1 \end{bmatrix}$ and $\begin{bmatrix}9 \\ 7 \end{bmatrix}$? What is this asking? This is asking if we can find scalars $c_{1},c_{2}$ such that $$ \begin{bmatrix}1 \\ 2 \end{bmatrix} = c_{1}\begin{bmatrix}1 \\ 1\end{bmatrix} + c_{2} \begin{bmatrix}9 \\ 7 \end{bmatrix} $$ Now, using the connection we know from [[smc-spring-2024-math-13/linear-algebra-notes/13-matrix-vector-equation-and-linear-system-of-equations-revisited|notes 13]], we see that this is the same as solving the matrix-vector equation $$ \begin{bmatrix}1 & 9 \\ 1 & 7 \end{bmatrix}\begin{bmatrix}c_{1}\\ c_{2} \end{bmatrix} =\begin{bmatrix}1 \\ 2\end{bmatrix} $$which means we can row-reduce the augmented matrix $$ \begin{array}{}c_{1}\ \ c_{2}\qquad\ \ \\ \begin{bmatrix}1 & 9 & \vdots & 1 \\ 1 & 7 & \vdots & 2\\ \end{bmatrix} & \stackrel{\text{row}}\sim & \begin{bmatrix} 1 & 9 & \vdots & 1 \\ 0 & -2 & \vdots & 1 \end{bmatrix} \end{array} $$so $c_{2}=-\frac{1}{2}$ and $c_{1}=1-9c_{2}=1+\frac{9}{2}=\frac{11}{2}$. Since we are able to solve for $c_{1}$ and $c_{2}$, this problem is consistent, and so yes, $\begin{bmatrix}1\\ 2\\ \end{bmatrix}$ can be written as a linear combination of the vectors $\begin{bmatrix}1 \\ 1\\ \end{bmatrix}$ and $\begin{bmatrix}9 \\ 7\\ \end{bmatrix}$, in particular we have the **explicit linear combination expression**: $$ \begin{bmatrix}1 \\ 2 \end{bmatrix} = \frac{11}{2} \begin{bmatrix}1 \\ 1 \end{bmatrix} - \frac{1}{2}\begin{bmatrix}9 \\ 7 \end{bmatrix}. $$ **Remark.** If we are not actually interested in the explicit linear combination expression, then whether something is a linear combination of others is equivalent to just asking is some certain linear system consistent or not. **Example.** Is $\begin{bmatrix}1 \\ 2\\ 3 \end{bmatrix}$ a linear combination of $\begin{bmatrix}1 \\ 1\\1 \end{bmatrix}$ and $\begin{bmatrix}1 \\ 2\\ 2\end{bmatrix}$? This is asking, are there coefficients $c_{1},c_{2}$ such that the equation $$ c_{1}\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}+c_{2}\begin{bmatrix} 1 \\ 2 \\ 2 \end{bmatrix} \stackrel{?}= \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} \quad (\dagger) $$holds. This is further equivalent to whether the linear system with the following augmented matrix is consistent or not: $$ \begin{bmatrix} 1 & 1 & \vdots & 1 \\ 1 & 2 & \vdots & 2 \\ 1 & 2 & \vdots & 3 \end{bmatrix} \stackrel{\text{row}}\sim \begin{bmatrix} 1 & 1 & \vdots & 1 \\ 0 & 1 & \vdots & 1 \\ 0 & 1 & \vdots & 2 \end{bmatrix} \stackrel{\text{row}}\sim \begin{bmatrix} 1 & 1 & \vdots & 1 \\ 0 & 1 & \vdots & 1 \\ 0 & 0 & \vdots & 1 \end{bmatrix} $$which we see is **inconsistent**, as we have a pivot in the augmented column, this means the equation $(\dagger)$ has no solution, which means: No, the vector $\begin{bmatrix}1 \\ 2\\ 3 \end{bmatrix}$ **is not a linear combination** of $\begin{bmatrix}1 \\ 1\\1 \end{bmatrix}$ and $\begin{bmatrix}1 \\ 2\\ 2\end{bmatrix}$! **Example.** Is $\begin{bmatrix}1 \\ 2\\ 3 \end{bmatrix}$ a linear combination of $\begin{bmatrix}2 \\ 4\\6 \end{bmatrix}$ and $\begin{bmatrix}-1 \\ -2\\ -3\end{bmatrix}$? Now for this one, one can probably **visually inspect** for a linear combination. But if we actually carry out our calculation, we can say a bit more. From previous examples, we see that this is equivalent to solving a system with augmented matrix: $$ \begin{bmatrix} 2 & -1 & \vdots & 1 \\ 4 & -2 & \vdots & 2 \\ 6 & -3 & \vdots & 3 \end{bmatrix} \stackrel{\text{row}}\sim \begin{bmatrix} 2 & -1 & \vdots & 1 \\ 0 & 0 & \vdots & 0 \\ 0 & 0 & \vdots & 0 \end{bmatrix} \ $$we see that this system is **consistent** and (assuming real coefficients) with **infinitely many possible solutions**. This means that $\begin{bmatrix}1 \\ 2\\ 3 \end{bmatrix}$ **is** a linear combination of $\begin{bmatrix}2 \\ 4\\6 \end{bmatrix}$ and $\begin{bmatrix}-1 \\ -2\\ -3\end{bmatrix}$, and further more, there are infinitely many possible weights we can choose to make this linear combination! **Remark.** This idea of linear combination is very general. And it can be applied to functions, polynomials, matrices, and other mathematical objects so long as (1) scaling makes sense and (2) addition makes sense. Let us see an example. **Example.** Consider the polynomial $p = 1+z+z^{2}$ with indeterminant $z$. We wonder, is $p$ a linear combination of these two polynomials: $$ f_{1}=1+z + 2z^{2} \quad \text{and}\quad f_{2}=1-z+z^{2} \quad? $$What this amounts to asking is, are there coefficients (let us assume it is $\mathbb{R}$) $c_{1}$ and $c_{2}$ such that $$ c_{1}f_{1} + c_{2}f_{2}\stackrel{?} = p\quad ?? $$ Let us write it out a bit. We are trying to find $c_{1}$ and $c_{2}$ such that $$ c_{1}(1+z + 2z^{2}) + c_{2}(1-z+z^{2}) = 1+z+z^{2}. $$If we expand everything and collect powers of $z$, we have $$ (c_{1}+c_{2}) + (c_{1}-c_{2})z + (2c_{1}+c_{2})z^{2} = 1 + z + z^{2} $$This means we want to solve the system of equations (by matching powers of $z$): $$ \left\{ \begin{array}{} c_{1} + c_{2} & = 1 \\ c_{1} - c_{2} & = 1 \\ 2c_{1} + c_{2} &= 1 \end{array} \right. $$This has an augmented matrix $$ \begin{bmatrix} 1 & 1 & \vdots & 1 \\ 1 & -1 & \vdots & 1 \\ 2 & 1 & \vdots & 1 \end{bmatrix}\stackrel{\text{row}}\sim \begin{bmatrix} 1 & 1 & \vdots & 1 \\ 0 & -2 & \vdots & 0 \\ 0 & -1 & \vdots & -1 \end{bmatrix}\stackrel{\text{row}}\sim \begin{bmatrix} 1 & 1 & \vdots & 1 \\ 0 & -2 & \vdots & 0 \\ 0 & 0 & \vdots & -1 \end{bmatrix} $$which we see is **inconsistent**. Conclusion: The polynomial $p$ is **not a linear combination** of the polynomials $f_{1}$ and $f_{2}$! **Remark.** Again, as long as it make sense to speak of scaling and sum of the objects $v_{1},v_{2},\ldots,v_{k}$ (which later we will call these things vectors), it will make sense to speak of a linear combination of them. **Example.** The expression $3 e^{x} + 2e^{-x} + 7\cos(2x) - 5\sin(2x)$ is a linear combination of $e^{x}, e^{-x}, \cos(2x)$, and $\sin(2x)$, with weights (coefficients) $3,2,7,-5$ respectively. **Example.** The expression $3\begin{bmatrix}1&3\\2 & 5\end{bmatrix} + 11 \begin{bmatrix}0&1\\1 & 0\end{bmatrix}$ is a linear combination of $\begin{bmatrix}1&3\\2 & 5\end{bmatrix}$ and $\begin{bmatrix}0&1\\1 & 0\end{bmatrix}$.